<!--header-->
<!--# include virtual="/ceca_two/common/html/header.html"-->
<link rel="stylesheet" href="/ceca_two/css/supplierInfomation.css" />
<link rel="stylesheet" href="/ceca_two/css/construction.css" />
<style>
    .layer-anim {
        width: 625px !important;
    }
    .gjss{
        float: right;
        background: #ff3030;
        color: #fff;
        padding: 0 20px;
        margin-right: 53px;
        cursor: pointer;
    }
    .content .screen .screenList .priceList tbody tr td{
        padding: 10px ;
    }
</style>
<!--banner-->
<!--# include virtual="/ceca_two/common/html/banner.html"-->
<div class="content">
    <h1 style="font-size: 24px;text-align: center;margin: 50px 0;">清单单价查询结果</h1>
    <!--
    <div class="navClassify">
        <div class="allClassift">
        </div>
        <div class="ClassiftForm">
            <input type="text" name="" id="gcmc" value="" class="ClassiftInput" placeholder="请输入您要搜索的工程名称"/>
            <button class="ClassiftBtn">搜索</button>
            <button class="searchBtn searchListPrice">查询清单单价</button>
            <button class="searchBtn searchMeterPrice">查询每平米消耗量</button>
        </div>
    </div>
    -->
    <!--

    <div class="classifyNav">
        <ul class="result clearfloat" >
            <li class="allresult" style="margin-bottom: 0">搜索条件</li>

            <li class="last" onclick="window.location.href='/ceca_two/modules/costnorm/construction.html'">清空筛选结果</li>
        </ul>
        <div class="nature jzfl">
            <p class="useNature">编制时间</p>
            <ul class="natureUl">
                <li>2018</li>
            </ul>
        </div>
        <div class="nature syxz">
            <p class="useNature">地区</p>
            <ul class="natureUl">
                <li>北京市</li>
            </ul>
        </div>
        <div class="nature syxz">
            <p class="useNature">工程分类</p>
            <ul class="natureUl">
                <li>民用建筑</li>
            </ul>
        </div>
        <div class="nature syxz">
            <p class="useNature">结构类型</p>
            <ul class="natureUl">
                <li>剪力墙结构</li>
            </ul>
        </div>
    </div>
    -->
    <!--
   <div class="advanced clearfloat layui-form">
       <div class="fl">高级筛选</div>
       <div class="fr">
           <div class="layui-form-item">
               <label class="layui-form-label">编制时间</label>
               <div class="layui-input-inline">
                   <input type="text" name="date" id="date" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input" readonly="">
               </div>
               <label class="layui-form-label">结构类型</label>
               <div class="layui-input-inline" id="jglx">
                   <select name="quiz1">
                       <option value="">请选择结构类型</option>
                       <option value="框架结构">框架结构</option>
                       <option value="剪力墙结构">剪力墙结构</option>
                       <option value="框架-剪力墙结构">框架-剪力墙结构</option>
                       <option value="筒体结构">筒体结构</option>
                       <option value="部分框支剪力墙结构">部分框支剪力墙结构</option>
                       <option value="板柱-剪力墙结构">板柱-剪力墙结构</option>
                       <option value="钢结构">钢结构</option>
                       <option value="砖混结构">砖混结构</option>
                       <option value="其他结构">其他结构</option>
                   </select>
               </div>
               <label class="layui-form-label">地上层数</label>
               <div class="layui-input-inline" id="dscs">
                   <select name="quiz2">
                       <option value="">请选择地上层数</option>
                       <option value="0~10层">0~10层</option>
                       <option value="11~20层">11~20层</option>
                       <option value="21~30层">21~30层</option>
                       <option value="31~40层">31~40层</option>
                       <option value="41~50层">41~50层</option>
                       <option value="50层以上">50层以上</option>
                   </select>
               </div>
               <label class="layui-form-label">地下层数</label>
               <div class="layui-input-inline" id="dxcs">
                   <select name="quiz3">
                       <option value="">请选择地下层数</option>
                       <option value="0~2层">0~2层</option>
                       <option value="3~4层">3~4层</option>
                       <option value="4层以上">4层以上</option>
                   </select>
               </div>
               <label class="layui-form-label">造价类别</label>
               <div class="layui-input-inline" id="zjlb">
                   <select name="quiz4">
                       <option value="">请选择造价类别</option>
                       <option value="全过程造价咨询">全过程造价咨询</option>
                       <option value="最高投标限价">最高投标限价</option>
                       <option value="竣工结算">竣工结算</option>
                       <option value="标底价">标底价</option>
                       <option value="投标价">投标价</option>
                       <option value="合同价">合同价</option>
                       <option value="设计概算">设计概算</option>
                       <option value="施工图预算">施工图预算</option>
                       <option value="经济评价">经济评价</option>
                       <option value="投资估算">投资估算</option>
                       <option value="工程造价鉴定">工程造价鉴定</option>
                       <option value="全过程工程咨询">全过程工程咨询</option>
                       <option value="竣工决算">竣工决算</option>
                   </select>
               </div>

               <div class="gjss">高级搜索</div>

           </div>
       </div>
   </div>
   -->
    <div class="screen">
        <!-- 列表位置  -->
        <div class="screenList" id="screenList">
        </div>
        <div id="fyq" style="text-align:center;margin:20px 0px">
        </div>
    </div>
</div>
<!--底部-->
<!--# include virtual="/ceca_two/common/html/footer.html"-->
</body>
</html>
<script type="text/html" id="allList">
    <table class="priceList">
        <thead>
        <tr>
            <th style="width: 85px;">编制时间 <img src="/ceca_two/img/sort.png" style="float: right;width: 12px;position: relative;top: 1px;margin-right: 2px;"></th>
            <th style="width: 60px;">地区</th>
            <th style="width: 120px;">工程分类</th>
            <th style="width: 155px;">结构类型</th>
            <th>工程名称</th>
            <th style="width: 85px;">总建筑面积<img src="/ceca_two/img/sort.png" style="float: right;width: 12px;position: relative;top: 1px;margin-right: 2px;"></th>
            <th style="width: 85px;">建筑总高度<img src="/ceca_two/img/sort.png" style="float: right;width: 12px;position: relative;top: 1px;margin-right: 2px;"></th>
            <th>清单编码</th>
            <th>项目名称</th>
            <th>项目特征描述</th>
            <th>综合单价<img src="/ceca_two/img/sort.png" style="float: right;width: 12px;position: relative;top: 1px;margin-right: 2px;"></th>
        </tr>
        </thead>
        <tbody>
        {{# for (var i = 0 ; i < d.length ; i++){ }}
        <tr class="tableTr clearfloat">
            <td>{{d[i].compilationTime}}</td>
            <td>{{d[i].address1}}</td>
            <td>{{d[i].catalogOne}}{{"-"+d[i].catalogSecond}}</td>
            <td>{{d[i].structureType}}</td>
            <td>{{d[i].costName}}</td>
            <td>{{d[i].totalArea}}</td>
            <td>{{d[i].projectHeight}}</td>
            <td>{{d[i].code}}</td>
            <td>{{d[i].name}}</td>
            <td>
                <p>{{d[i].description}}</p>
            </td>
            <td>{{d[i].price}}</td>
        </tr>
        {{#  } }}
        </tbody>
    </table>
</script>
<script type="text/javascript">
    layui.use(['construction','layer',"Router",'laytpl','laypage','Zutil','form'], function() {
        var Zutil  =layui.Zutil;
        var Router = layui.Router;
        var laytpl= layui.laytpl;
        var laydate= layui.laydate;
        var layer = layui.layer;
        var laypage =layui.laypage;
        var form = layui.form;
        var listObj = {};
        listObj.pageNumber = Zutil.getQueryString("pageNumber") || 1;
        listObj.pageSize = Zutil.getQueryString("pageSize") || 10;
    	Zutil.getQueryString("structureType") ? listObj.structureType = Zutil.decodeURI(window.atob(Zutil.getQueryString("structureType"))) : "" ;
    	Zutil.getQueryString("catalogOne") ? listObj.catalogOne = Zutil.decodeURI(window.atob(Zutil.getQueryString("catalogOne"))).split("_")[0] : "" ;
    	Zutil.getQueryString("catalogSecond") ? listObj.catalogSecond = Zutil.decodeURI(window.atob(Zutil.getQueryString("catalogSecond"))).split("_")[0] : "" ;
    	Zutil.getQueryString("address1") ? listObj.address1 = Zutil.decodeURI(window.atob(Zutil.getQueryString("address1"))) : "" ;
    	Zutil.getQueryString("compilationTime") ? listObj.compilationTime = Zutil.decodeURI(window.atob(Zutil.getQueryString("compilationTime"))) : "" ;
    	Zutil.getQueryString("code") ? listObj.code = Zutil.decodeURI(window.atob(Zutil.getQueryString("code"))) : "" ;

        $(".searchListPrice").on("click",function () {
            layer.open({
                type: 2,
                title: '查询清单单价',
                shadeClose: true,
                shade: false,
                maxmin: true,
                area: ['893px', '560px'],
                content: '/ceca_two/modules/costnorm/base/searchListPrice.html'
            })
        });
        $(".searchMeterPrice").on("click",function () {
            layer.open({
                type: 2,
                title: '查询每平米消耗量',
                shadeClose: true,
                shade: false,
                maxmin: true,
                area: ['893px', '560px'],
                content: '/ceca_two/modules/costnorm/base/searchMeterPrice.html'
            })
        });
        // 列表渲染
        filterList(listObj);
        function filterList(obj){
            $.ajax({
                type:"post",
                url:"/guidance_service/front/data/info/searchDataInfo.do ",
                data:obj,
                success : function (result){
                    console.log(result);
                    if (result.resultCode === 200){
                        var list = allList.innerHTML;

                        var data = JSON.parse(JSON.stringify(result.data).replace(/\\n/g, "<br>"));

                        laytpl(list).render(data.list, function(html){
                            $("#screenList").html(html);
                        });

                        laypage({
                            cont: 'fyq'
                            ,pages: data.totalPage
                            ,curr:data.pageNumber
                            ,groups:data.pageSize
                            ,skin: '#ff0000'
                            ,jump: function(opt, first){
                                var curr = opt.curr;   //当前的页码
                                console.log(curr);
                                listObj.pageNumber = curr|| 1;
                                console.log(listObj);
                                if(!first)filterList(listObj);
                            }
                        });
                    }else{
                        layer.msg(result.message,{icon:5,time:2000});
                    }
                },error : function (){
                    layer.msg("请求错误，请稍后重试",{icon:5,time:2000});
                }
            });

        }

    });
</script>